package com.comando.service.impl;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.comando.dao.UserDao;
import com.comando.model.UserT;
import com.comando.service.UserService;

@Service(value="userService")
public class UserServiceImpl implements UserService {
	/**
	 * Logger for this class
	 */
	private static final Logger logger = Logger
			.getLogger(UserServiceImpl.class);

	private UserDao userDao;
	
	@Override
	public void addUser(UserT user) {
		logger.info("进来啦222");
	
		userDao.save(user);
	}
	
	@Override
	public UserT getUser(int userId) {
		return userDao.get(UserT.class, userId);
	}

	public UserDao getUserDao() {
		return userDao;
	}

	@Autowired
	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}


}
	